import { createI18n } from 'vue-i18n/dist/vue-i18n.cjs.js'      //解决浏览器警告
import messages from './locales/index'

const i18n = createI18n({
    fallbackLocale: 'en',
    globalInjection:true,
    legacy: false, // you must specify 'legacy: false' option
    locale: window.localStorage.getItem('language') || "zh",
    messages,
});

export default i18n